package day019.ioStream;

import java.util.Map;
import java.util.Properties;
import java.util.Set;

public class PropertiesDemo1 {
    public static void main(String[] args) {
        Properties properties = new Properties();
        properties.put("it001", "张三");
        properties.put("it002", "李四");
        properties.put("it003", "王五");

        Set<Object> set = properties.keySet();
        for (Object key : set) {
            System.out.println(key + "---" + properties.get(key));
        }

        System.out.println("=============================");

        Set<Map.Entry<Object, Object>> set2 = properties.entrySet();
        for (Map.Entry<Object, Object> entry : set2) {
            Object key = entry.getKey();
            Object value = entry.getValue();
            System.out.println(key + "---" + value);
        }
    }
}
